package com.detooa.detooa.service.impl;

import java.util.List;
import com.detooa.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.detooa.detooa.mapper.DeToOaRecordMapper;
import com.detooa.detooa.domain.DeToOaRecord;
import com.detooa.detooa.service.IDeToOaRecordService;
import com.detooa.common.core.text.Convert;

/**
 * 推送记录信息Service业务层处理
 * 
 * @author detooa
 * @date 2024-01-19
 */
@Service
public class DeToOaRecordServiceImpl implements IDeToOaRecordService 
{
    @Autowired
    private DeToOaRecordMapper deToOaRecordMapper;

    /**
     * 查询推送记录信息
     * 
     * @param recordId 推送记录信息主键
     * @return 推送记录信息
     */
    @Override
    public DeToOaRecord selectDeToOaRecordByRecordId(Long recordId)
    {
        return deToOaRecordMapper.selectDeToOaRecordByRecordId(recordId);
    }

    /**
     * 查询推送记录信息列表
     * 
     * @param deToOaRecord 推送记录信息
     * @return 推送记录信息
     */
    @Override
    public List<DeToOaRecord> selectDeToOaRecordList(DeToOaRecord deToOaRecord)
    {
        return deToOaRecordMapper.selectDeToOaRecordList(deToOaRecord);
    }

    /**
     * 新增推送记录信息
     * 
     * @param deToOaRecord 推送记录信息
     * @return 结果
     */
    @Override
    public int insertDeToOaRecord(DeToOaRecord deToOaRecord)
    {
        deToOaRecord.setCreateTime(DateUtils.getNowDate());
        return deToOaRecordMapper.insertDeToOaRecord(deToOaRecord);
    }

    /**
     * 修改推送记录信息
     * 
     * @param deToOaRecord 推送记录信息
     * @return 结果
     */
    @Override
    public int updateDeToOaRecord(DeToOaRecord deToOaRecord)
    {
        return deToOaRecordMapper.updateDeToOaRecord(deToOaRecord);
    }

    /**
     * 批量删除推送记录信息
     * 
     * @param recordIds 需要删除的推送记录信息主键
     * @return 结果
     */
    @Override
    public int deleteDeToOaRecordByRecordIds(String recordIds)
    {
        return deToOaRecordMapper.deleteDeToOaRecordByRecordIds(Convert.toStrArray(recordIds));
    }

    /**
     * 删除推送记录信息信息
     * 
     * @param recordId 推送记录信息主键
     * @return 结果
     */
    @Override
    public int deleteDeToOaRecordByRecordId(Long recordId)
    {
        return deToOaRecordMapper.deleteDeToOaRecordByRecordId(recordId);
    }
}
